﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;

namespace eStock.Controls.CustomControls
{
    class UILabel : Control
    {
        public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register("Header", typeof(string), typeof(UILabel), new FrameworkPropertyMetadata());
        public static readonly DependencyProperty HeaderWidthProperty = DependencyProperty.Register("HeaderWidth", typeof(int), typeof(UILabel), new FrameworkPropertyMetadata());
        public static readonly DependencyProperty HeaderSizeProperty = DependencyProperty.Register("HeaderSize", typeof(int), typeof(UILabel), new FrameworkPropertyMetadata());
        public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(string), typeof(UILabel), new FrameworkPropertyMetadata());
        public static readonly DependencyProperty ReadOnlyProperty = DependencyProperty.Register("ReadOnly", typeof(bool), typeof(UILabel), new FrameworkPropertyMetadata());
        public static readonly DependencyProperty MouseUpProperty = DependencyProperty.Register("MouseUpEv", typeof(RoutedEvent), typeof(UILabel), new FrameworkPropertyMetadata());

        public string Header
        {
            get { return (string)GetValue(HeaderProperty); }
            set { SetValue(HeaderProperty, value); }
        }
        public int HeaderWidth
        {
            get { return (int)GetValue(HeaderWidthProperty); }
            set { SetValue(HeaderWidthProperty, value); }
        }
        public int HeaderSize
        {
            get { return (int)GetValue(HeaderSizeProperty); }
            set { SetValue(HeaderSizeProperty, value); }
        }
        public string Value
        {
            get { return (string)GetValue(ValueProperty); }
            set { SetValue(ValueProperty, value); }
        }
        public bool ReadOnly
        {
            get { return (bool)GetValue(ReadOnlyProperty); }
            set { SetValue(ReadOnlyProperty, value); }
        }

        static UILabel()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(UILabel),new FrameworkPropertyMetadata(typeof(UILabel)));            
        }
        public UILabel()
        {
            IsTabStop = false;
        }
    }
}
